export interface LoginForm {
    username: string;
    password: string;
    uid: string;
    verify_code: string;
}

export interface LoginResult {
    token: TokenInfo;
    user: SysUserInfo;
}

export interface TokenInfo {
    access_token: string,
    token_type: string,
    expire_in: number,
}

export interface Menu {
    id: number;
    pid: number;
    name: string;
    title: string;
    type: number;
    router: string;
    component: string;
    params: string;
    icon_type: number;
    icon_name: string;
    keep_alive: number;
    full_screen: number;
    hidden: number;
    iframe: number;
    is_fixed: number;
    link: string;
    sort: number;
    status: number;
    children?: Menu[]
}

export interface SysUserInfo {
    id: number;
    dept_id: number;
    role_id: number;
    is_admin: boolean;
    username: string
    nickname: string;
    phone: string;
    email: string;
    avatar: string;
    gender: string;
    birthday: string;
    introduction: string;
    status: number;
}

export interface DeptInfo {
    id: number;
    pid: number;
    name: string;
    manage_user_id: number;
    status: number;
}

export interface RoleInfo {
    id: number;
    name: string;
    is_admin: number;
    level: number;
    status: number;
    auth_ids: number[];
}

export interface  AuthOperation {
    [key: string]: Operation
}

export interface Operation {
    id: number;
    pid: number;
    name: string;
    title: string;
    type: number;
    auth_key: string;
    icon_name: string;
    status: number
}

// 未读消息
export interface UserMessage {
    nums: number;
    types: MessageType[];
}

// 消息类型
export interface MessageType {
    type: number;
    name: string;
    code: string;
    list: Message[]; // 未读消息列表
}

// 消息
export interface Message {
    id: number;
    type: number;
    content: string;
    create_time: string;
}

// 歌曲
export interface Song {
    id: number;
    name: string;
    singer: string;
    album: string;
    cover: string;
    url: string;
    duration: number;
    status: number;
    sort: number;
}

export interface UserInfo {
    id: number;
    uid: string;
    username: string;
    phone: string;
    avatar: string;
    email: string;
    website: string;
    client_ip: string;
    status: number;
}
